home *** CD-ROM | disk | FTP | other *** search
/ PsL Monthly 1993 December / PSL Monthly Shareware CD-ROM (December 1993).iso / prgmming / dos / pascal / overxms.exe / READ.ME < prev   
Text File  |  1993-01-05  |  3KB  |  92 lines

  1. READ.ME  --  Loading Overlays in XMS
  2.  
  3. Files
  4. -----
  5.  
  6. Apart from this notice, the following files should be present in this
  7. archive:
  8.  
  9. OVERXMS.ASM           Source code of XMS overlay support.
  10. OVERXMS.OBJ           Object code of XMS overlay support.
  11. OVERXMS.PAS           Declares OvrInitXMS.
  12.  
  13. OVRXMS.PAS            Built In Assembler version for TP6 TP7 by Arnold Bailey
  14.  
  15. Purpose
  16. -------
  17.  
  18. This package is for users of Turbo Pascal, version 5.0 or later.
  19. These three files are all you need to add XMS support to overlaying.
  20. If you think you can use it, then I probably don't have to explain
  21. what the benefits are of using XMS memory over EMS memory - or
  22. emulations thereof.  But I will anyway:
  23.  
  24. -  XMS is found on more machines than EMS.
  25. -  All XMS is addressable as one physical unit, not in chunks of 16 kB
  26.    like EMS.
  27. -  XMS is faster.  How much faster, depends on the kind of system.
  28.    It probably doesn't matter much on 386/486 systems, but the speedup
  29.    is noticable on a 286 with emulated EMS.  Or if you have a typical
  30.    1 MB 286 clone, configured as 640+384, without either board EMS or
  31.    emulated EMS (served by e.g. Quarterdeck's QRAM memory manager),
  32.    then thanks to OVERXMS you'll have fast loading overlays at last.
  33.  
  34. ... and last but not least:
  35. -  OVERXMS is compact.  It adds a mere 425 bytes of code to your .EXE
  36.    file.
  37.  
  38. Using OVERXMS
  39. -------------
  40.  
  41. Usage is straightforward.  Just change the "uses" clause, so that it
  42. includes OVERXMS.  Next, spot the line wherein you initialise the
  43. overlay manager.  Add two lines, so that it will run something like:
  44.  
  45.     OverInit(YourApplication);
  46.     OvrInitXMS;
  47.     If OvrResult <> OvrOk Then
  48.       OvrInitEMS;
  49.  
  50. That's all.  First, we check whether we can load the overlay into XMS;
  51. if we don't succeed, we resort to EMS allocation and suffer a slight
  52. loss of performance; if no EMS is available, though luck -- continue
  53. with overlays on disk.
  54.  
  55. Status codes
  56. ------------
  57.  
  58. Possible return codes from OverInitXMS are:
  59.   OvrOk           (0)      ... success
  60.   OvrIOError     (-4)      ... something went wrong whilst reading the
  61.                                overlay from disk
  62.   OvrNoXMSDriver (-7)      ... there's no XMS on this system
  63.   OvrNoXMSMemory (-8)      ... there's insufficient XMS memory available
  64.  
  65. History
  66. -------
  67.  
  68. 1.00     - First version May 5, 1992.
  69. 1.10     - January 3, 1993 Bug Fix for DRDOS 6 and other XMS Managers that
  70.            zero BX if no error.
  71.            by Arnold Bailey [72020,136]    BIX abailey
  72. 1.20     - January 5, 1993 Bug Fix.
  73.            Method used to calculate Total size of XMS buffer in AllocateXMS
  74.            is different from what actually gets allocated in CopyUnitToXMS.
  75.            If the XMS buffer size is just less than a 1k boundary, the buffer
  76.            will overflow in CopyUnitToXMS.
  77.  
  78.            Changed AllocateXMS to calculate the proper size, taking word size
  79.            moves only.
  80.            by Arnold Bailey [72020,136]    BIX abailey
  81.  
  82. Author
  83. ------
  84.  
  85. Wilbert van Leijen    Fidonet 2:500/12.10956
  86. Marathonweg 72-2
  87. NL-1076 TM Amsterdam
  88. The Netherlands
  89.  
  90.  
  91. OVERXMS is, with source code and all, donated to the public domain.
  92.